<template>
    <view class="map-body">
    	<web-view :fullscreen="false" :webview-styles="{width:'100%', height:'90%'}"
    		:style="{width:'100%', height:'100%'}" ref="webview" id="webview" :src=src
    		@message="handleMessage" @load="onWebviewLoad">
    	</web-view>
    </view>
</template>
 
<script>
	export default{
		data(){
			return{
				src:null
			}
		},
		onLoad() {
			var	user = uni.getStorageSync('user');
			
			var url = 'http://skyteksmart.com/hotline.html?'; 
			this.src = url+'email='+ user.userAcc +'&nick='+user.nick +'&id='+user.userId;
			console.log("url==",this.src);
		},
		methods:{
			setWebviewHeight() {
				// #ifdef APP-PLUS
				let height = 0;
				uni.getSystemInfo({
					success: sysinfo => {
						height = sysinfo.safeArea.height
			
						const currentWebview = this.$scope.$getAppWebview();
						const wv = this.$scope.$getAppWebview().children()[0];
						wv.setStyle({
							top:0,
							height: 200,
						});
			
					},
				});
				// #endif
			}
		}
	}
	
</script>

 <style lang="scss" scoped>
	 .map-body {
		height: 200rpx;
		width: 100vw;

	 }
 </style>